﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using KelonProud.Administration.Domain.Authorization;

namespace KelonProud.Administration.Logs.Domain
{
    [Table("KpEntityChangeSets")]
    public class KelonEntityChangeSet : Abp.EntityHistory.EntityChangeSet
    {
        public KelonEntityChangeSet()
        {
            EntityChanges = new List<KelonEntityChange>();
        }

        public new virtual ICollection<KelonEntityChange> EntityChanges { get; set; }

        [ForeignKey("UserId")]
        public virtual User User { get; set; }

        public static KelonEntityChangeSet ToHonkEntityChangeSet(Abp.EntityHistory.EntityChangeSet entityChangeSet)
        {
            return (KelonEntityChangeSet) entityChangeSet;

        }
    }
}
